//
//  Todos.swift
//  NaiCha
//
//  Created by 唐安坤 on 2024/9/19.
//

import Foundation
import SwiftUI
struct Todos:Identifiable {
    var id: UUID = UUID()
    var todoName: String
    var priority: PriorityEnum
    var isMark:Bool = false
    var isFinish:Bool = false
}
enum PriorityEnum: Int,CaseIterable {
    case normal = 0
    case low = 1
    case high = 2
    var name: String {
        switch self{
        case .normal:
            return "正常"
        case .low:
            return "低优先级"
        case .high:
            return "高优先级"
        }
    }
    var color: Color {
        switch self{
        case .high:
            return .red
        case .normal:
            return .green
        case .low:
            return .gray
        }
    }
}
